package com.kmproject.haifu.mvp.ui.adapter;

import android.support.annotation.Nullable;
import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.kmproject.haifu.R;
import com.kmproject.haifu.mvp.model.entity.beans.HousePayWayBean;

import java.util.List;

public class PopuwindowReasonRemovalAdapter extends BaseQuickAdapter<HousePayWayBean, BaseViewHolder> {
    public PopuwindowReasonRemovalAdapter( @Nullable List<HousePayWayBean> data) {
        super(R.layout.popuwindow_reason_removal_item, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, HousePayWayBean item) {
            helper.setText(R.id.popuwindow_reason_removal_item_reason,item.getName());
          if (item.getName().contains("不想"))
          {
             helper.getView(R.id.popuwindow_reason_removal_item_ts).setVisibility(View.VISIBLE);
          }else {
              helper.getView(R.id.popuwindow_reason_removal_item_ts).setVisibility(View.GONE);
          }
          if (helper.getPosition()==getItemCount()-1)
          {
              helper.getView(R.id.popuwindow_reason_removal_item_view).setVisibility(View.GONE);
          }
    }
}
